import fetch from "@/utils/http";

/** 登录 */
export const getLogin = (data?: object) => {
  return fetch<string>("v1/operator/login", "HR", {
    method: "post",
    body: JSON.stringify(data)
  });
};
/**
 * 用户信息
 */
export interface Info {
  operatorUuid: string;
  companyUuid: string;
  loginName: string;
  accountNonLocked: boolean;
  realName: string;
  mobile: string;
  email: string;
  type: number;
  loginTimes: number;
  remark?: any;
  companyName: string;
  isCompanyAdmin: boolean;
  backgroundColor?: any;
  position?: any;
  companyShortName: string;
  roleKeyList: string[];
  jobUuid?: any;
  isOnline?: any;
}
export const getInfo = () => {
  return fetch<Info>("v1/operator/info", "HR", {
    method: "post"
  });
};
